<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">

    <div class="layui-card-header padding-left-40 color-desc">
        使用微信公众平台直接模式时，需要在微信公众号平台配置授权IP及网页授权域名，另外再将获取到的参数填写到下面。
    </div>

    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label"><b>Token</b><br><span class="nowrap color-desc">接口认证令牌</span></label>
            <div class="layui-input-block">
                <input name="wechat.token" required placeholder="请输入消息推送对接认证Token（必填）" value="{:sysconf('wechat.token')}" class="layui-input">
                <p class="help-block">公众号平台与系统对接认证Token，请优先填写此参数并保存，然后再在微信公众号平台操作对接。</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><b>AppId</b><br><span class="nowrap color-desc">公众号 APPID</span></label>
            <div class="layui-input-block">
                <input name="wechat.appid" placeholder="请输入以wx开头的18位公众号APPID（必填）" pattern="^wx[0-9a-z]{16}$" maxlength="18" required="required" value="{:sysconf('wechat.appid')}" class="layui-input">
                <p class="help-block">公众号APPID是所有接口必要参数，可以在公众号平台 [ 开发 > 基本配置 ] 页面获取。</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><b>AppSecret</b><br><span class="nowrap color-desc">公众号 Secret</span></label>
            <div class="layui-input-block">
                <input name="wechat.appsecret" required placeholder="请输入32位公众号AppSecret（必填）" value="{:sysconf('wechat.appsecret')}" maxlength="32" pattern="^[0-9a-z]{32}$" class="layui-input">
                <p class="help-block">公众号应用密钥是所有接口必要参数，可以在公众号平台 [ 开发 > 基本配置 ] 页面授权后获取。</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><b>EnAesKey</b><br><span class="nowrap color-desc">消息加密密钥</span></label>
            <div class="layui-input-block">
                <input name="wechat.encodingaeskey" placeholder="请输入43位消息公众号加密密钥（可选）" value="{:sysconf('wechat.encodingaeskey')}" maxlength="43" pattern="^.{43}$" class="layui-input">
                <p class="help-block">若开启了消息加密时必需填写，消息加密密钥必需填写并保持与公众号平台一致。</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><b>PushApiUrl</b><br><span class="nowrap color-desc">消息推送接收</span></label>
            <div class="layui-input-block">
                <div class="relative">
                    <input value="服务器授权IP：{$geoip}" disabled class="layui-input layui-bg-gray border-0">
                    <a data-copy="{$geoip}" class="absolute layui-btn layui-bg-gray" style="top:0;right:0;background:none!important"><i class="fa fa-copy"></i></a>
                </div>
                <div class="relative margin-top-5">
                    <input value="消息推送地址：{$thrNotify}" disabled class="layui-input layui-bg-gray border-0">
                    <a data-copy="{$thrNotify}" class="absolute layui-btn layui-bg-gray" style="top:0;right:0;background:none!important"><i class="fa fa-copy"></i></a>
                </div>
                <p class="help-block">公众号服务平台消息推送接口及服务器授权IP地址，需在公众号接口开发处配置。</p>
            </div>
        </div>

        <div class="hr-line-dashed"></div>
        <input type="hidden" name="wechat.type" value="api">

        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存配置</button>
        </div>

    </div>

</form>